package pojo;

public class PollAttr {
    public static final String TableName = "pollsys_poll";
    private int _itemId;
    public int getItemId() {
        return this._itemId;
    }
    public void setItemId(int itemId) {
        this._itemId  = itemId;
    }
    
    private int _userId;
    public int getUserId() {
        return this._userId;
    }
    public void setUserId(int userId) {
        this._userId  = userId;
    }
    
    private String _createTime;
    public String getCreateTime() {
        return this._createTime;
    }
    public void setCreateTime(String createTime) {
        this._createTime    = createTime;
    }
   
    /**
     * 验证信息是否合法 
     */
    public String validate() {
        if(this._itemId < 1 || this._userId < 1) {
            return "非法投票！";
        }
        
        return null; 
    }
}
